import JSEncrypt from 'jsencrypt';

export function rsaEncode(value, key) {
    const encrypt = new JSEncrypt();
    encrypt.setPublicKey(key);
    let cipherText = encrypt.encrypt(value);
    return cipherText;
}